package plantshop.controller.moves;

import java.io.Serializable;

import plantshop.model.Customer;
import plantshop.model.Game;

public class CustomerBuyRequestMove extends TimeMove implements Serializable{
	private static final long serialVersionUID = -4026098027641824735L;
	private boolean where;
	private int display;
	private int index;
	private Customer customer;
	
	public CustomerBuyRequestMove(boolean where, int display, int index, Customer customer)
	{
		this.where = where;
		this.display = display;
		this.index = index;
		this.customer = customer;
	}
	
	public void execute(Game game)
	{
		customer.setMoneyNum(game.sellRequestedPlant(where, display, index, customer.getDesiredPlant().getDominant(), customer));
		customer.setLeaveTrue();
		customer.setDisplayMoneySign(100);
	}
}
